Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not choke on MessageSet without version #1030

Merged
merged 1 commit into from
Feb 2, 2018

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Feb 1, 2018

If we end un unlucky and MessageSet buffer is truncated right before
we can read magic value, we just return ErrInsufficientData, even
if some messages were previously successfully parsed.

This propagates all the way up to partitionConsumer, where we zero
parsed messages, which results in ErrMessageTooLarge returned
to the consumer.

This commit fixes the issue by setting PartialTrailingMessage to true
on MessageSet, making it possible to read successfully parsed messages.

If we end un unlucky and MessageSet buffer is truncated right before
we can read magic value, we just return `ErrInsufficientData`, even
if some messages were previously successfully parsed.

This propagates all the way up to `partitionConsumer`, where we zero
parsed messages, which results in `ErrMessageTooLarge` returned
to the consumer.

This commit fixes the issue by setting `PartialTrailingMessage` to `true`
on `MessageSet`, making it possible to read successfully parsed messages.
@eapache
Copy link
Contributor

eapache commented Feb 2, 2018

Nice find, thanks.

@eapache eapache merged commit a5eaad6 into IBM:master Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants